package deibay.server.frontend.commands;

import deibay.messages.Message;
import deibay.messages.RequestItemDetailsMsg;
import deibay.server.eventargs.GetItemEventArg;
import deibay.server.events.GetItemEvent;
import deibay.server.frontend.FrontEndCore;
import deibay.users.User;

public class RequestItemDetailsCommand extends Command{

	
	public RequestItemDetailsCommand(User user, Message msg) {
		super(user, msg);		
	}

	@Override
	public void execute() {		
		String item = ((RequestItemDetailsMsg)message).getItemID();
		FrontEndCore.getInstance().getServerConnection().send(new GetItemEvent(new GetItemEventArg(user, item)));
	}
}
